
class Animal{
    public String name;
    public int age;
    public void eat(){
        System.out.println(name+"正在吃饭");
    }
}

class Dog extends Animal{
    public String color;
    public void wangWang(){
        System.out.println(name+"正在汪汪叫");
    }

}

class Cat extends Animal{
    public int price;
    public void miaoMiao(){
        System.out.println(name+"正在喵喵叫");
    }

}

public class Text2 {
    public static void main(String[] args) {

        Dog dog=new Dog();
        dog.name="坦克";
        dog.eat();
        dog.wangWang();
        System.out.println("=========");
        Cat cat=new Cat();
        cat.name="咪咪";
        cat.eat();
        cat.miaoMiao();
    }
}
